<template>
    <div>
        <detail-details :comment="comment"></detail-details>
    </div>
</template>

<script>
    import DetailDetails from './component/Details'
    import axios from 'axios'
    export default {
        name: "Detail",
        components: {
            DetailDetails
        },
        data () {
          return{
              comment: []
          }
        },
        mounted() {
            let id = this.$route.params && this.$route.params.id;
            axios.get('/api/wearcomment/index.html').then((response) => {
                let res = response.data.data;
                this.comment = res.filter((res) => {
                    return res.wear_id == id;
                });
                JSON.parse(JSON.stringify(this.comment))
                console.log(this.comment)
            })
        }
    }
</script>

<style scoped>

</style>
